{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <http://www.zhengzhong.net/>

  Created on 2008-08-15.
  $Id$
-->
{% endcomment %}

{#________________________________________________________________________________________________#}

<div class="resto_list">

  {% for resto in restos %}
  
    <div class="resto">
    
      <div class="head">
        <span class="names">
          <a href="{{webapp_}}/resto/{{resto.uid}}/">{{resto.names|escape}}</a>
        </span>
        {% if resto.ratings %}
          {% with resto.average as rating_as_value %}
          {% with resto.average_as_stars as rating_as_stars %}
            {% include "foodsnroses/include/rating.html" %}
          {% endwith %}
          {% endwith %}
        {% else %}
          <span class="na">No ratings</span>
        {% endif %}
      </div>
      
      <div class="address">
        {{resto.address}}
        -
        <a href="{{webapp_}}/search/post_code/?value={{resto.post_code|escape}}">
          {{resto.post_code|escape}}
        </a>
        <a href="{{webapp_}}/search/city/?value={{resto.city|escape}}">
          {{resto.city.capitalize|escape}}
        </a>
      </div>
      
      <div class="description">
        {{resto.description|default:""|slice:":200"|escape}} ...
      </div>
      
      <div class="resto_info">
        {% if resto.tag_list %}
          Tags:
          {% for tag in resto.tag_list %}
            <a href="{{webapp_}}/search/tag/?value={{tag|escape}}">{{tag|escape}}</a>,
          {% endfor %}
          <br/>
        {% endif %}
        
        {% if resto.best_dish_list %}
          Best dishes:
          {% for dish in resto.best_dish_list %}
            <a href="{{webapp_}}/search/dish/?value={{dish|escape}}">{{dish|escape}}</a>,
          {% endfor %}
          <br/>
        {% endif %}
        
        Added on <b>{{resto.submit_date|date:"Y-m-d"}}</b>
        by <b>{{resto.submitter.nickname}}</b>
        <br/>
        
        <b>{{resto.ratings}}</b> ratings | <b>{{resto.comments}}</b> comments
      
      </div><!--/.resto_info-->
    
    </div><!--/.resto-->
  
  {% endfor %}

</div><!--/.resto_list-->


